<template>
  <view class="knowledge-page">
      <web-view :webview-styles="webviewStyles" :src="src"></web-view>
      
    </view>
</template>

<script>
import InterServer from "@/common/config/server"
import Vue from 'vue'
export default {
  data() {
    return {
       detail:"",
       content:"",
       src:"",
        webviewStyles: {
            progress: {
                color: '#FF3333'
            }
        }
    };
  },
  onLoad(options) {
    console.log("------------------")
    console.log(options)
    if(options){
        //this.getknowDetails(options.id)
        this.src=options.link
    }
  },
  onShow(){
    // #ifdef H5
        document.title=`贷款详情`
    // #endif
  },
  methods: {
    getknowDetails(id){
       InterServer.knowDetails({
         id:id
       }).then(res=>{
         if(res.code==200){
           this.detail=res.data
           this.content=res.data.content.replace(/blockquote';/g,`p style='`).replace(/spanyes';/g,`span style='`);
         }
       }) 
    }
  }
};
</script>

 <style lang="less" >
.knowledge-page {
  font-size: 26upx;
  height: 100%;
  background: #ffffff;
  .title {
    color: #333333;
    font-size: 36upx;
    text-align: center;
    padding: 40upx;
    line-height: 50upx;
  }
  .babel {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999999;
    padding-bottom: 65upx;
    .line {
      height: 20upx;
      width: 1upx;
      background: #999999;
      margin: 0 10upx;
    }
  }
  .content {
    font-size: 30upx;
    color: #333333;
    line-height: 45upx;
    margin: 0 40upx;
    text-align: justify;
    margin-bottom: 50upx;
    image {
      width: 670upx;
      height: 320upx;
      border-radius: 10upx;
      margin: 45upx 0;
    }
  }
}
</style>
